package net.chrisrichardson.ec2deployer;

import groovy.ui.Console
import net.chrisrichardson.ec2deployer.core.AWSProperties
import net.chrisrichardson.ec2deployer.core.CloudManager
import net.chrisrichardson.ec2deployer.core.EC2;



class EC2Shell {

  public static void main(args) {
	  Console console = new Console();
      AWSProperties awsProperties = new AWSProperties("h:/cer/personalDocs/technical/ec2/aws.properties")
	  def ec2 = new EC2(awsProperties)
	  try {
	    ec2.pollStatus()
	  } catch (Exception e) {
		  e.printStackTrace()
	  }
	  console.setVariable("ec2", ec2);
	  console.setVariable("s", ec2.servers.size() > 0 ? ec2.servers[0] : null);
	  console.run();
  }

}